package com.tom;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

import com.mysql.jdbc.Driver;




public class TestConn {

	public static void main(String[] args) {
		try {
			DriverManager.registerDriver(new Driver());
			Connection conn = DriverManager.getConnection("jdbc:mysql://j.snpy.org/j102","jstu","abc123");	
			Statement stmt = conn.createStatement();
			int rowCount = stmt.executeUpdate("INSERT INTO users (id,password,email) values ('stu05','123','abc')");
			System.out.println(rowCount);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
